<template>
	<div>
		<el-row :gutter="24">
			<!--
            	作者：1040117458@qq.com
            	时间：2017-09-25
            	描述：每个保险项目后边跟着一个不计免赔
            -->
			<div class="table-d" v-if="templateShow == '1'">
				<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
					<tr>
						<td colspan="7"><b style="text-align: center;">保险报价单  </b></td>
					</tr>
					<tr>
						<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
						<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
						<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
						<td style="width:5%;text-align: center;background-color: #55C0F1;color: #333333;"><b>是否 </b></td>
						<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>不计免赔保费  </b></td>
						<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
						<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[0].starts" @change="startChange('0')">车船使用税</el-checkbox>
						</td>
						<td>
						</td>
						<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
						</td>
						<td></td>
						<td></td>
						<td>
							<el-checkbox v-model="intem[18].starts" @change="startChange('18')">玻璃单独玻璃险</el-checkbox>
						</td>
						<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[1].starts" @change="startChange('1')">交强险</el-checkbox>
						</td>
						<td>
						</td>
						<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
						</td>
						<td></td>
						<td></td>
						<td>
							<el-checkbox v-model="intem[21].starts" @change="startChange('21')">车上货物责任险</el-checkbox>
						</td>
						<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<td rowspan="1">
						<el-checkbox v-model="intem[2].starts" @change="startChange('2')">车辆损失险</el-checkbox>
					</td>
					<td></td>
					<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
					<td rowspan="1" style="text-align: center;">
						<el-checkbox v-model="intem[3].starts" @change="startChange('3')"></el-checkbox>
					</td>
					<td rowspan="1"><input v-model="intem[3].price" class='table_input' v-on:blur="sumPrice"></td>
					<td rowspan="1">
						<el-checkbox v-model="intem[20].starts" @change="startChange('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
					</td>
					<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[4].starts" @change="startChange('4')">第三者责任险</el-checkbox>
						</td>
						<td rowspan="1">
							<el-select v-model="intem[4].limit" @change="quotaChange('4')" size="small">
								<el-option label="5万" value="50000"></el-option>
								<el-option label="10万" value="100000"></el-option>
								<el-option label="15万" value="150000"></el-option>
								<el-option label="20万" value="200000"></el-option>
								<el-option label="30万" value="300000"></el-option>
								<el-option label="50万" value="500000"></el-option>
								<el-option label="100万" value="1000000"></el-option>
							</el-select>
						</td>
						<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>
						<td rowspan="1" style="text-align: center;">
							<el-checkbox v-model="intem[5].starts" @change="startChange('5')"></el-checkbox>
						</td>
						<td rowspan="1"><input v-model="intem[5].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[24].starts" @change="startChange('24')">驾意险</el-checkbox>
						</td>
						<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[6].starts" @change="startChange('6')">盗抢险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
						</td>
						<td style="text-align: center;">
							<el-checkbox v-model="intem[7].starts" @change="startChange('7')"></el-checkbox>
						</td>
						<td><input v-model="intem[7].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[19].starts" @change="startChange('19')">润华玻璃险</el-checkbox>
						</td>
						<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[8].starts" @change="startChange('8')">车上人员责任险-司机</el-checkbox>
						</td>
						<td><input v-model="intem[8].limit" v-on:blur="quotaChange('8')" style="width: 90%;border-style:none;outline:medium;">万
						</td>
						<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>
						<td style="text-align: center;">
							<el-checkbox v-model="intem[10].starts" @change="startChange('10')"></el-checkbox>
						</td>
						<td><input v-model="intem[10].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[22].starts" @change="startChange('22')">润华划痕险</el-checkbox>
						</td>
						<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[9].starts" @change="startChange('9')">车上人员责任险-乘客</el-checkbox>
						</td>
						<td><input v-model="intem[9].limit" v-on:blur="quotaChange('9')" style="width: 90%;border-style:none;outline:medium;">万</td>
						<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>
						<td style="text-align: center;">
							<el-checkbox v-model="intem[11].starts" @change="startChange('11')"></el-checkbox>
						</td>
						<td><input v-model="intem[11].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[23].starts" @change="startChange('23')">续保手册</el-checkbox>
						</td>
						<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[12].starts" @change="startChange('12')">车身划痕险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>
						<td style="text-align: center;">
							<el-checkbox v-model="intem[13].starts" @change="startChange('13')"></el-checkbox>
						</td>
						<td><input v-model="intem[13].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[14].starts" @change="startChange('14')">自燃损失险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
						<td style="text-align: center;">
							<el-checkbox v-model="intem[15].starts" @change="startChange('15')"></el-checkbox>
						</td>
						<td><input v-model="intem[15].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[16].starts" @change="startChange('16')">发动机涉水险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>
						<td style="text-align: center;">
							<el-checkbox v-model="intem[17].starts" @change="startChange('17')"></el-checkbox>
						</td>
						<td style="border-bottom-right-radius: 2px;"><input v-model="intem[17].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[26].starts" @change="startChange('26')">新增设备险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>
						<td style="text-align: center;">
							<el-checkbox v-model="intem[27].starts" @change="startChange('27')"></el-checkbox>
						</td>
						<td><input v-model="intem[27].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
				</table>
			</div>
			<!--
            	作者：1040117458@qq.com
            	时间：2017-09-25
            	描述：只有一个不计免赔
            -->
			<div class="table-d" v-if="templateShow == '0'">
				<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
					<tr>
						<td colspan="7"><b style="text-align: center;">保险报价单  </b></td>
					</tr>
					<tr>
						<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
						<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
						<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
						<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
						<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[0].starts" @change="startChangeTwo('0')">车船使用税</el-checkbox>
						</td>
						<td>
						</td>
						<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
						</td>
						<td>
							<el-checkbox v-model="intem[14].starts" @change="startChangeTwo('14')">自燃损失险</el-checkbox>
						</td>
						<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[1].starts" @change="startChangeTwo('1')">交强险</el-checkbox>
						</td>
						<td>
						</td>
						<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
						</td>
						<td>
							<el-checkbox v-model="intem[21].starts" @change="startChangeTwo('21')">车上货物责任险</el-checkbox>
						</td>
						<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<td rowspan="1">
						<el-checkbox v-model="intem[2].starts" @change="startChangeTwo('2')">车辆损失险</el-checkbox>
					</td>
					<td></td>
					<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
					<td>
						<el-checkbox v-model="intem[16].starts" @change="startChangeTwo('16')">发动机涉水险</el-checkbox>
					</td>
					<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[4].starts" @change="startChangeTwo('4')">第三者责任险</el-checkbox>
						</td>
						<td rowspan="1">
							<el-select v-model="intem[4].limit" size="small">
								<el-option label="5万" value="50000"></el-option>
								<el-option label="10万" value="100000"></el-option>
								<el-option label="15万" value="150000"></el-option>
								<el-option label="20万" value="200000"></el-option>
								<el-option label="30万" value="300000"></el-option>
								<el-option label="50万" value="500000"></el-option>
								<el-option label="100万" value="1000000"></el-option>
							</el-select>
						</td>
						<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[24].starts" @change="startChangeTwo('24')">驾意险</el-checkbox>
						</td>
						<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[6].starts" @change="startChangeTwo('6')">盗抢险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
						</td>
						<td>
							<el-checkbox v-model="intem[19].starts" @change="startChangeTwo('19')">润华玻璃险</el-checkbox>
						</td>
						<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[8].starts" @change="startChangeTwo('8')">车上人员责任险-司机</el-checkbox>
						</td>
						<td><input v-model="intem[8].limit" style="width: 90%;border-style:none;outline:medium;">万
						</td>
						<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[22].starts" @change="startChangeTwo('22')">润华划痕险</el-checkbox>
						</td>
						<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[9].starts" @change="startChangeTwo('9')">车上人员责任险-乘客</el-checkbox>
						</td>
						<td><input v-model="intem[9].limit" style="width: 90%;border-style:none;outline:medium;">万</td>
						<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[23].starts" @change="startChangeTwo('23')">续保手册</el-checkbox>
						</td>
						<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[18].starts" @change="startChangeTwo('18')">玻璃单独玻璃险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[12].starts" @change="startChangeTwo('12')">车身划痕险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[20].starts" @change="startChangeTwo('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
						</td>
						<td></td>
						<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[25].starts" @change="startChangeTwo('25')">不计免赔</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[25].price" class='table_input' v-on:blur="sumPrice"></td>

						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[26].starts" @change="startChangeTwo('26')">新增设备险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
				</table>
			</div>
			<!--
            	作者：1040117458@qq.com
            	时间：2017-09-25
            	描述：保险项目中包含不计免赔
            -->
			<div class="table-d" v-if="templateShow == '2'">
				<table border="1" cellspacing="1" cellpadding="10" style="color:rgb(103,106,108);font-size: 10px;width: 100%;border-collapse: collapse;">
					<tr>
						<td colspan="7"><b style="text-align: center;">保险报价单  </b></td>
					</tr>
					<tr>
						<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>主要投保险种  </b></td>
						<td style="width:15%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保额/限额 </b></td>
						<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费  </b></td>
						<td style="width:25%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险险种</b></td>
						<td style="width:10%;text-align: center;background-color: #55C0F1;color: #333333;"><b>保险费</b></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[0].starts" @change="startChangeTwo('0')">车船使用税</el-checkbox>
						</td>
						<td>
						</td>
						<td><input v-model="intem[0].price" class='table_input' v-on:blur="sumPrice">
						</td>
						<td>
							<el-checkbox v-model="intem[14].starts" @change="startChangeTwo('14')">自燃损失险</el-checkbox>
						</td>
						<td><input v-model="intem[14].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[1].starts" @change="startChangeTwo('1')">交强险</el-checkbox>
						</td>
						<td>
						</td>
						<td><input v-model="intem[1].price" class='table_input' v-on:blur="sumPrice">
						</td>
						<td>
							<el-checkbox v-model="intem[21].starts" @change="startChangeTwo('21')">车上货物责任险</el-checkbox>
						</td>
						<td><input v-model="intem[21].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<td rowspan="1">
						<el-checkbox v-model="intem[2].starts" @change="startChangeTwo('2')">车辆损失险</el-checkbox>
					</td>
					<td></td>
					<td rowspan="1"><input v-model="intem[2].price" class='table_input' v-on:blur="sumPrice"></td>
					<td>
						<el-checkbox v-model="intem[16].starts" @change="startChangeTwo('16')">发动机涉水险</el-checkbox>
					</td>
					<td><input v-model="intem[16].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[4].starts" @change="startChangeTwo('4')">第三者责任险</el-checkbox>
						</td>
						<td rowspan="1">
							<el-select v-model="intem[4].limit" size="small">
								<el-option label="5万" value="50000"></el-option>
								<el-option label="10万" value="100000"></el-option>
								<el-option label="15万" value="150000"></el-option>
								<el-option label="20万" value="200000"></el-option>
								<el-option label="30万" value="300000"></el-option>
								<el-option label="50万" value="500000"></el-option>
								<el-option label="100万" value="1000000"></el-option>
							</el-select>
						</td>
						<td rowspan="1"><input v-model="intem[4].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[24].starts" @change="startChangeTwo('24')">驾意险</el-checkbox>
						</td>
						<td><input v-model="intem[24].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[6].starts" @change="startChangeTwo('6')">盗抢险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[6].price" class='table_input' v-on:blur="sumPrice"></td>
						</td>
						<td>
							<el-checkbox v-model="intem[19].starts" @change="startChangeTwo('19')">润华玻璃险</el-checkbox>
						</td>
						<td><input v-model="intem[19].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[8].starts" @change="startChangeTwo('8')">车上人员责任险-司机</el-checkbox>
						</td>
						<td><input v-model="intem[8].limit" style="width: 90%;border-style:none;outline:medium;">万
						</td>
						<td><input v-model="intem[8].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[22].starts" @change="startChangeTwo('22')">润华划痕险</el-checkbox>
						</td>
						<td><input v-model="intem[22].price" class='table_input' v-on:blur="sumPrice"></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[9].starts" @change="startChangeTwo('9')">车上人员责任险-乘客</el-checkbox>
						</td>
						<td><input v-model="intem[9].limit" style="width: 90%;border-style:none;outline:medium;">万</td>
						<td><input v-model="intem[9].price" class='table_input' v-on:blur="sumPrice"></td>
						<td>
							<el-checkbox v-model="intem[23].starts" @change="startChangeTwo('23')">续保手册</el-checkbox>
						</td>
						<td><input v-model="intem[23].price" class='table_input' v-on:blur="sumPrice"></td>

					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[18].starts" @change="startChangeTwo('18')">玻璃单独玻璃险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[18].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[12].starts" @change="startChangeTwo('12')">车身划痕险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[12].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td rowspan="1">
							<el-checkbox v-model="intem[20].starts" @change="startChangeTwo('20')">机动车损失保险无法找到第三方特约险</el-checkbox>
						</td>
						<td></td>
						<td rowspan="1"><input v-model="intem[20].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td>
							<el-checkbox v-model="intem[26].starts" @change="startChangeTwo('26')">新增设备险</el-checkbox>
						</td>
						<td></td>
						<td><input v-model="intem[26].price" class='table_input' v-on:blur="sumPrice"></td>
						<td></td>
						<td></td>
					</tr>
				</table>
			</div>
		</el-row>
		<br>
		<el-row :gutter="24">
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">交强险价格:</strong>
			</el-col>
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">{{jqPrice}}￥</strong>
			</el-col>
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">车船税价格:</strong>
			</el-col>
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">{{ccsPrice}}￥</strong>
			</el-col>
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">商业险价格:</strong>
			</el-col>
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">{{syPrice}}￥</strong>
			</el-col>
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">合计:</strong>
			</el-col>
			<el-col :span="2">
				<strong style="font-size: 15px;padding-top: 0px;">{{sumPrice}}￥</strong>
			</el-col>
			<br><br>
		</el-row>
	</div>
</template>

<script>
	export default {
		data: function() {
			return {
				//交强险的价格
				jqPrice: '',
				//商业险价格
				syPrice: '',
				//总保费
				sumPrice: '',
				//车船税价格
				ccsPrice: '',
				//交强险总价格
				jqSumPrice: '',
				//模板显示
				templateShow: '',
				//选中的保险项目
				selectItemList: [],
				//保险项目
				intem: [{
					name: "交强险-车船使用税",
					type: 0,
					limit: "",
					price: "",
					id: 0,
					starts: false,
				}, {
					name: "交强险-保险费",
					type: 1,
					limit: "",
					price: "",
					id: 1,
					starts: false,
				}, {
					name: "车辆损失险",
					type: 1,
					limit: "",
					price: "",
					id: 2,
					starts: false,
				}, {
					name: "车辆损失险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 3,
					starts: false,
				}, {
					name: "第三者责任险",
					type: 1,
					limit: "",
					price: "",
					id: 4,
					starts: false,
				}, {
					name: "第三者责任险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 5,
					starts: false,
				}, {
					name: "盗抢险",
					type: 1,
					limit: "",
					price: "",
					id: 6,
					starts: false,
				}, {
					name: "盗抢险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 7,
					starts: false,
				}, {
					name: "车上人员责任险-司机",
					type: 1,
					limit: "",
					price: "",
					id: 8,
					starts: false,
				}, {
					name: "车上人员责任险-乘客",
					type: 1,
					limit: "",
					price: "",
					id: 9,
					starts: false,
				}, {
					name: "车上人员责任险-司机-不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 10,
					starts: false,
				}, {
					name: "车上人员责任险-乘客-不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 11,
					starts: false,
				}, {
					name: "车身划痕险",
					type: 1,
					limit: "",
					price: "",
					id: 12,
					starts: false,
				}, {
					name: "车身划痕险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 13,
					starts: false,
				}, {
					name: "自燃损失险",
					type: 1,
					limit: "",
					price: "",
					id: 14,
					starts: false,
				}, {
					name: "自燃损失险不计免赔",
					type: 1,
					limit: "",
					price: "",
					id: 15,
					starts: false,
				}, {
					name: "发动机涉水险",
					type: 1,
					limit: "",
					price: "",
					id: 16,
					starts: false,
				}, {
					name: "发动机涉水险不计免赔",
					type: 0,
					limit: "",
					price: "",
					id: 17,
					starts: false,
				}, {
					name: "玻璃单独玻璃险",
					type: 0,
					limit: "",
					price: "",
					id: 18,
					starts: false,
				}, {
					name: "润华玻璃险",
					type: 0,
					limit: "",
					price: "",
					id: 19,
					starts: false,
				}, {
					name: "机动车损失保险无法找到第三方特约险",
					type: 0,
					limit: "",
					price: "",
					id: 20,
					starts: false,
				}, {
					name: "车上货物责任险",
					type: 0,
					limit: "",
					price: "",
					id: 21,
					starts: false,
				}, {
					name: "润华划痕险",
					type: 0,
					limit: "",
					price: "",
					id: 22,
					starts: false,
				}, {
					name: "续保手册",
					type: 0,
					limit: "",
					price: "",
					id: 23,
					starts: false,
				}, {
					name: "驾意险",
					type: 0,
					limit: "",
					price: "",
					id: 24,
					starts: false,
				}, {
					name: "不计免赔",
					type: 0,
					limit: "",
					price: "",
					id: 25,
					starts: false,
				}, {
					name: "新增设备险",
					type: 0,
					limit: "",
					price: "",
					id: 26,
					starts: false,
				}, {
					name: "新增设备险不计免赔",
					type: 0,
					limit: "",
					price: "",
					id: 27,
					starts: false,
				}],
			}
		},
		props: {
			orderItemList: [], //已经选中的保险项目
			templateShow: '', //保险项目模板显示

		},
		watch: {
			//监听选中的保险项目
			selectItemList: function() {
				//有选中的保险项目
				if(this.$data.selectItemList.length != 0) {
					//传给父组件的数据
					var propFatherData = {
						selectItemList: [], //选中的保险项目
						//交强险的价格
						jqPrice: '',
						//商业险价格
						syPrice: '',
						//总保费
						sumPrice: '',
						//车船税价格
						ccsPrice: '',
						//交强险总价格
						jqSumPrice: '',
					};
					propFatherData.selectItemList = this.$data.selectItemList;
					propFatherData.jqPrice = this.$data.jqPrice;
					propFatherData.syPrice = this.$data.syPrice;
					propFatherData.sumPrice = this.$data.sumPrice;
					propFatherData.ccsPrice = this.$data.ccsPrice;
					propFatherData.jqSumPrice = this.$data.jqSumPrice;
					this.$emit('acceptedData', propFatherData);
				}
			},
		},
		methods: {
			//初始化保险项目：orderItemList有值表示要修改报价单或保险单
			returnItem: function() {
				//保险项目初始化
				for(var j = 0; j < this.$data.intem.length; j++) {
					this.$data.intem[j].starts = false;
					this.$data.intem[j].limit = "";
					this.$data.intem[j].price = "";
				};
				//展示已有保险项目
				if(this.orderItemList.length > 0) {
					for(var i = 0; i < this.orderItemList.length; i++) {
						for(var j = 0; j < this.$data.intem.length; j++) {
							if(this.$data.intem[j].id == this.orderItemList.itemId) {
								this.$data.intem[j].starts = true;
								this.$data.intem[j].limit = this.orderItemList.itemLimit;
								this.$data.intem[j].price = this.orderItemList.itemPrice;
								break;
							}
						}
					}
					//计算保费信息
					this.sumPrice();
				}
			},
			//价格计算
			sumPrice: function() {
				//总价格
				debugger;
				var sumPrice = 0;
				for(var i = 0; i < this.$data.intem.length; i++) {
					if(this.$data.intem[i].starts == true && this.$data.intem[i].price != "") { //勾选保险项目并填写保费
						this.$data.intem[i].price = Number(this.$data.intem[i].price);
						sumPrice = sumPrice + this.$data.intem[i].price;
					}
				}
				debugger;
				//车船税价格
				this.$data.ccsPrice = this.$data.intem[0].starts == true ? Number(this.$data.intem[0].price).toFixed(2) : 0;
				//交强险价格
				this.$data.jqPrice = this.$data.intem[1].starts == true ? Number(this.$data.intem[1].price).toFixed(2) : 0;
				//交强险总价格 = 车船税 + 交强险
				this.$data.jqSumPrice = this.$data.ccsPrice + this.$data.jqPrice;
				//商业险价格 = 总价格 - 交强险总价格
				this.$data.syxbj = Number(sumPrice - this.$data.jqSumPrice).toFixed(2);
				//总保费价格
				this.$data.sumPrice = Number(sumPrice).toFixed(2);
				//每次计算价格筛选出选中的保险项目
				var y = 0;
				this.$data.selectItemList = [];
				for(var i = 0; i < this.$data.intem.length; i++) {
					debugger;
					if(this.$data.intem[i].starts == true) {
						this.$data.selectItemList[y] = this.$data.intem[i];
						y++;
					}
				};
			},
			//三者，车上保额赋给不计免赔
			quotaChange: function(num) {
				if(num == "4") {
					this.$data.intem[5].limit = this.$data.intem[4].limit;
				} else if(num == "8") {
					this.$data.intem[10].limit = this.$data.intem[8].limit;
				} else if(num == "9") {
					this.$data.intem[11].limit = this.$data.intem[9].limit;
				}
			},
			//不计免赔何在一起
			startChangeTwo: function(num) {
				//模板2不计免赔合在一起，取消勾选清空保额和保费
				if(this.$data.intem[num].starts == false) {
					this.$data.intem[num].limit = "";
					this.$data.intem[num].price = "";
				}
				//每次改变计算保费信息
				this.sumPrice();
			},
			//不计免赔分开选择险种自动选中不计免赔
			startChange: function(num) {
				debugger;
				switch(num) {
					case '2':
						//车辆损失险关联车辆损失险不计免赔
						if(this.$data.intem[2].starts == true) {
							this.$data.intem[3].starts = true;
						} else {
							this.$data.intem[3].starts = false;
							this.$data.intem[2].price = "";
							this.$data.intem[3].price = "";
						}
						break;
					case '4':
						//第三者责任险关联三者不计免赔
						if(this.$data.intem[4].starts == true) {
							this.$data.intem[5].starts = true;
						} else {
							this.$data.intem[5].starts = false;
							this.$data.intem[4].price = "";
							this.$data.intem[5].price = "";
							this.$data.intem[4].limit = "";
							this.$data.intem[5].limit = "";
						}
						break;
					case '6':
						//盗抢险关联盗抢险不计免赔
						if(this.$data.intem[6].starts == true) {
							this.$data.intem[7].starts = true;
						} else {
							this.$data.intem[7].starts = false;
							this.$data.intem[6].price = "";
							this.$data.intem[7].price = "";
						}
						break;
					case '8':
						//车上人员责任险-司机关联上车司机不计免赔
						if(this.$data.intem[8].starts == true) {
							this.$data.intem[10].starts = true;
						} else {
							this.$data.intem[10].starts = false;
							this.$data.intem[8].price = "";
							this.$data.intem[10].price = "";
							this.$data.intem[8].limit = "";
							this.$data.intem[10].limit = "";
						}
						break;
					case '9':
						//车上人员责任险-乘客关联车上乘客不计免赔
						if(this.$data.intem[9].starts == true) {
							this.$data.intem[11].starts = true;
						} else {
							this.$data.intem[11].starts = false;
							this.$data.intem[9].price = "";
							this.$data.intem[11].price = "";
							this.$data.intem[9].limit = "";
							this.$data.intem[11].limit = "";
						}
						break;
					case '12':
						//车身划痕险管理车身划痕不计免赔
						if(this.$data.intem[12].starts == true) {
							this.$data.intem[13].starts = true;
						} else {
							this.$data.intem[13].starts = false;
							this.$data.intem[12].price = "";
							this.$data.intem[13].price = "";
						}
						break;
					case '14':
						//自燃损失险管理自燃损失险不计免赔
						if(this.$data.intem[14].starts == true) {
							this.$data.intem[15].starts = true;
						} else {
							this.$data.intem[15].starts = false;
							this.$data.intem[14].price = "";
							this.$data.intem[15].price = "";
						}
						break;
					case '16':
						//发动机涉水险关联涉水险不计免赔
						if(this.$data.intem[16].starts == true) {
							this.$data.intem[17].starts = true;
						} else {
							this.$data.intem[17].starts = false;
							this.$data.intem[16].price = "";
							this.$data.intem[17].price = "";
						}
						break;
					case '26':
						//新增设备险关联新增设备险不计免赔
						if(this.$data.intem[26].starts == true) {
							this.$data.intem[27].starts = true;
						} else {
							this.$data.intem[27].starts = false;
							this.$data.intem[26].price = "";
							this.$data.intem[27].price = "";
						}
						break;
					default:
						//其他保险项目（取消勾选状态时清空保额和保费）
						if(this.$data.intem[num].starts == false) {
							this.$data.intem[num].price = "";
							this.$data.intem[num].limit = "";
						}
						break;
				};
				//每次改变计算一次保费信息
				this.sumPrice();
			},

		},
		created: function() {
			//初始化保险项目
			this.returnItem();
		}
	}
</script>

<style>

</style>